package com.zzyl.nursing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzyl.nursing.domain.Reservation;
import com.zzyl.nursing.vo.TimeCountVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author: ZHD
 * @Date: 2025/08/23 7:49
 * @Description:
 */
@Mapper
public interface ReservationMapper extends BaseMapper<Reservation> {


    void addReservation(Reservation reservation);

    /**
     * 统计指定时间范围内的预约数量
     * @param startTime 开始时间
     * @param endTime 结束时间
     * @return 预约数量列表
     */
    List<TimeCountVo> countReservationsForTime(@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime);
}
